<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>组件</title>
	</head>
	<body>
		<div id="example">
			<my-component></my-component>
		</div>
		<script type="text/javascript" src="js/vue.js" ></script>
		<script type="text/javascript">
			// 注册
			Vue.component('my-component', {
				template: '<div>A custom component!</div>'
			});
			
			// 创建根实例
			new Vue({
				el: '#example'
			});
		</script>
	</body>
</html>
